-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PER-9361-Email and phone verification are broken; #302
Conversation
Changed the way isLoggedIn is handled in the verify component and made sure that keepLoggedIn is not being set to null after phone or mail verification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally these look good, I just have some notes about a small adjustment to the tests I'd like to see fixed. Thanks for fixing this bug!
instance.setAccount(account); | ||
|
||
await instance.verifyEmail('sampleToken'); | ||
expect(instance.getAccount().emailStatus).toBe('status.auth.verified'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(instance.getAccount().emailStatus).toBe('status.auth.verified'); | |
expect(instance.getAccount().emailStatus).toBe('status.auth.verified'); | |
expect(instance.getAccount().keepLoggedIn).toBeTrue(); |
Let's add a check for the keepLoggedIn
behavior since that's what this particular ticket is all about. These tests otherwise just check for email/phone verification, and so pass even when copied over to the main branch. I'd like to see these tests fail if we run them if the specific bug addressed in this ticket isn't fixed, if that makes sense.
instance.setAccount(account); | ||
|
||
await instance.verifyEmail('sampleToken'); | ||
expect(instance.getAccount().phoneStatus).toBe('status.auth.verified'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(instance.getAccount().phoneStatus).toBe('status.auth.verified'); | |
expect(instance.getAccount().phoneStatus).toBe('status.auth.verified'); | |
expect(instance.getAccount().keepLoggedIn).toBeTrue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be working now, thanks Andrei!
Changed the way isLoggedIn is handled in the verify component and made sure that keepLoggedIn is not being set to null after phone or mail verification.
Steps to test:
1.Log in or create a new account.
2. Verify your email.
3. Refresh.
The button should not appear a second time now.